package tournamentmanager;

import gui.actions.Actions;
import gui.TourneyManView;

import org.eclipse.swt.widgets.Display;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class TourneyMan {

  public static void main(String[] args) {
    Display display = Display.getDefault();
    Injector injector = Guice.createInjector(new TourneyManModule());
    injector.getInstance(Actions.class).init();
    TourneyManView view = injector.getInstance(TourneyManView.class);
    view.getShell().open();
    while (!view.getShell().isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }

}
